home *** CD-ROM | disk | FTP | other *** search
/ BBS Toolkit / BBS Toolkit.iso / doors_2 / pb_116.zip / SDK.ZIP / BIRTHDAY.C < prev    next >
C/C++ Source or Header  |  1991-09-21  |  779b  |  32 lines

  1. #include "pb_sdk.h"
  2.  
  3. char *expr[] = { "GREAT","GOOD","DON'T CARE","DEPRESSING","HATE IT" };
  4.  
  5. main()
  6. {
  7.  int age;
  8.  char c;
  9.  FILE *fp;
  10.  
  11.  age = LoginDate[2]-CurUser->birthday[2];
  12.  
  13.  printf("\n\7 ** \3CONGRATULATIONS\7 **  How does it feel to be %d years old?\n\n",age);
  14.  
  15.  printf("       \0031 \7- \6Great!\n"
  16.         "       \0032 \7- \6Good I guess...\n"
  17.         "       \0033 \7- \6I don't care\n"
  18.         "       \0034 \7- \6Pretty depressing\n"
  19.         "       \0035 \7- \6I hate it!!\n\n"
  20.         "  \7Please select: \3");
  21.  
  22.  c = WaitKeys("12345");
  23.  
  24.  printf("%c\n\n\6Thank you!   Press [Enter] to continue.\t\n",c);
  25.  
  26.  fp = fopen("BIRTHDAY.LOG","at");
  27.  fprintf(fp,"%-35s : Age %-2d -> %s\n",CurUser->name,age,expr[c-'1']);
  28.  fclose(fp);
  29.  
  30.  return 0;
  31. }
  32.